package cn.edu.zut.cs.Business;

import cn.edu.zut.cs.DAO.CommunityDAO;
import cn.edu.zut.cs.Model.Community;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class CommunityService {

    CommunityDAO communityDAO;


    @Autowired
    public void setCommunityDAO(CommunityDAO communityDAO){
        this.communityDAO=communityDAO;
    }
    public void insertCommunity(Community community){
        communityDAO.insertpeoManagement(community);
        communityDAO.insertpeoCommunity(community);
    }
    public void insertpeoManagement(Community community){
        communityDAO.insertpeoManagement(community);
    }
    public List<Community> peoCommunity(){
        return communityDAO.peoCommunity();
    }
    public List<Community> peoManagement(){
        return communityDAO.peoManagement();
    }
    public void deletepeoCommunity(Community community){
        communityDAO.deletepeoCommunity(community);
    }
}
